package com.lin.project.controller;

import com.lin.project.vo.User;
import com.lin.start.FormatTemplate;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PeojectController {
    @Autowired
    private FormatTemplate formatTemplate;

    @GetMapping("/format")
    public String format(){
        User user = User.builder().age(18).name("张三").build();
        String name = StringUtils.uncapitalize(PeojectController.class.getSimpleName());
        user.setName(name);
        return formatTemplate.doFormat(user);
    }


}
